package com.qf.service;

import com.qf.dao.SysUserDao;
import com.qf.pojo.SysUsers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

@Service
public class SysUserServiceImpl implements SysUserService{

    @Autowired
    SysUserDao sysUserDao;

    @Override
    public SysUsers findByUsername(String username) {
        SysUsers users = sysUserDao.selectUserByUsername(username);
        return users;
    }

    @Override
    public Set<String> findRolesByUserId(int userId) {
        return sysUserDao.findRolesByUserId(userId);
    }

    @Override
    public Set<String> findPermsByUserId(int userId) {
        return sysUserDao.findPermsByUserId(userId);
    }

}
